using System.Collections.Generic;

public static class ItemInfoMgr
{
	private static string FILE_PATH = "Cfg/Item";

	private static List<ItemInfo> _itemInfos = new List<ItemInfo>();

	public static void Load()
	{
		_itemInfos = Utils.LoadXML<ItemInfo>(FILE_PATH);
	}

	public static ItemInfo GetInfo(int infoId)
	{
		for (int i = 0; i < _itemInfos.Count; i++)
		{
			if (_itemInfos[i].id == infoId)
			{
				return _itemInfos[i];
			}
		}
		return null;
	}
}
